home *** CD-ROM | disk | FTP | other *** search
- /* A lexical scanner generated by flex */
-
- /* Scanner skeleton version:
- * $Header: flex.skl,v 1.2 94/01/04 14:33:15 vern Exp $
- */
-
- #define FLEX_SCANNER
-
- #include <stdio.h>
-
-
- /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
- #ifdef c_plusplus
- #ifndef __cplusplus
- #define __cplusplus
- #endif
- #endif
-
-
- #ifdef __cplusplus
-
- #include <stdlib.h>
- #include <unistd.h>
-
- /* Use prototypes in function declarations. */
- #define YY_USE_PROTOS
-
- /* The "const" storage-class-modifier is valid. */
- #define YY_USE_CONST
-
- #else /* ! __cplusplus */
-
- #ifdef __STDC__
-
- #define YY_USE_PROTOS
- #define YY_USE_CONST
-
- #endif /* __STDC__ */
- #endif /* ! __cplusplus */
-
-
- #ifdef __TURBOC__
- #define YY_USE_CONST
- #endif
-
-
- #ifndef YY_USE_CONST
- #ifndef const
- #define const
- #endif
- #endif
-
-
- #ifdef YY_USE_PROTOS
- #define YY_PROTO(proto) proto
- #else
- #define YY_PROTO(proto) ()
- #endif
-
- /* Returned upon end-of-file. */
- #define YY_NULL 0
-
- /* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index. If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
- */
- #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-
- /* Enter a start condition. This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
- #define BEGIN yy_start = 1 + 2 *
-
- /* Translate the current start state into a value that can be later handed
- * to BEGIN to return to the state.
- */
- #define YY_START ((yy_start - 1) / 2)
-
- /* Action number for EOF rule of a given start state. */
- #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
- /* Special action meaning "start processing a new file". Now included
- * only for backward compatibility with previous versions of flex.
- */
- #define YY_NEW_FILE yyrestart( yyin )
-
- #define YY_END_OF_BUFFER_CHAR 0
-
- /* Size of default input buffer. */
- #define YY_BUF_SIZE 16384
-
- typedef struct yy_buffer_state *YY_BUFFER_STATE;
-
- extern int yyleng;
- extern FILE *yyin, *yyout;
-
- #ifdef __cplusplus
- extern "C" {
- #endif
- extern int yywrap YY_PROTO(( void ));
- #ifdef __cplusplus
- }
- #endif
-
- #define EOB_ACT_CONTINUE_SCAN 0
- #define EOB_ACT_END_OF_FILE 1
- #define EOB_ACT_LAST_MATCH 2
-
- /* The funky do-while in the following #define is used to turn the definition
- * int a single C statement (which needs a semi-colon terminator). This
- * avoids problems with code like:
- *
- * if ( condition_holds )
- * yyless( 5 );
- * else
- * do_something_else();
- *
- * Prior to using the do-while the compiler would get upset at the
- * "else" because it interpreted the "if" statement as being all
- * done when it reached the ';' after the yyless() call.
- */
-
- /* Return all but the first 'n' matched characters back to the input stream. */
-
- #define yyless(n) \
- do \
- { \
- /* Undo effects of setting up yytext. */ \
- *yy_cp = yy_hold_char; \
- yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
- YY_DO_BEFORE_ACTION; /* set up yytext again */ \
- } \
- while ( 0 )
-
- #define unput(c) yyunput( c, yytext_ptr )
-
-
- struct yy_buffer_state
- {
- FILE *yy_input_file;
-
- char *yy_ch_buf; /* input buffer */
- char *yy_buf_pos; /* current position in input buffer */
-
- /* Size of input buffer in bytes, not including room for EOB
- * characters.
- */
- int yy_buf_size;
-
- /* Number of characters read into yy_ch_buf, not including EOB
- * characters.
- */
- int yy_n_chars;
-
- /* Whether this is an "interactive" input source; if so, and
- * if we're using stdio for input, then we want to use getc()
- * instead of fread(), to make sure we stop fetching input after
- * each newline.
- */
- int yy_is_interactive;
-
- /* Whether to try to fill the input buffer when we reach the
- * end of it.
- */
- int yy_fill_buffer;
-
- /* Whether we've seen an EOF on this buffer. */
- int yy_eof_status;
- #define EOF_NOT_SEEN 0
- /* "Pending" happens when the EOF has been seen but there's still
- * some text to process. Note that when we actually see the EOF,
- * we switch the status back to "not seen" (via yyrestart()), so
- * that the user can continue scanning by just pointing yyin at
- * a new input file.
- */
- #define EOF_PENDING 1
- };
-
- static YY_BUFFER_STATE yy_current_buffer = 0;
-
- /* We provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state".
- */
- #define YY_CURRENT_BUFFER yy_current_buffer
-
-
- /* yy_hold_char holds the character lost when yytext is formed. */
- static char yy_hold_char;
-
- static int yy_n_chars; /* number of characters read into yy_ch_buf */
-
-
- int yyleng;
-
- /* Points to current character in buffer. */
- static char *yy_c_buf_p = (char *) 0;
- static int yy_init = 1; /* whether we need to initialize */
- static int yy_start = 0; /* start state number */
-
- /* Flag which is used to allow yywrap()'s to do buffer switches
- * instead of setting up a fresh yyin. A bit of a hack ...
- */
- static int yy_did_buffer_switch_on_eof;
-
- static void yyunput YY_PROTO(( int c, char *buf_ptr ));
- void yyrestart YY_PROTO(( FILE *input_file ));
- void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
- void yy_load_buffer_state YY_PROTO(( void ));
- YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
- void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
- void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
-
- static int yy_start_stack_ptr = 0;
- static int yy_start_stack_depth = 0;
- static int *yy_start_stack = 0;
- static void yy_push_state YY_PROTO(( int new_state ));
- static void yy_pop_state YY_PROTO(( void ));
- static int yy_top_state YY_PROTO(( void ));
-
- #ifndef yytext_ptr
- static void yy_flex_strcpy YY_PROTO(( char *, const char * ));
- #endif
-
- static void *yy_flex_alloc YY_PROTO(( unsigned int ));
- static void *yy_flex_realloc YY_PROTO(( void *ptr, unsigned int ));
- static void yy_flex_free YY_PROTO(( void * ));
-
- #define yy_new_buffer yy_create_buffer
-
- #define INITIAL 0
- #define CPP1 1
- #define INIT1 2
- #define INIT2 3
- #define CURLY 4
- #define SQUARE 5
- #define LEXYACC 6
- #define SKIP 7
- #define COMMENT 8
- #define COMMLINE 9
- #define CPPCOMMENT 10
- typedef unsigned char YY_CHAR;
- typedef int yy_state_type;
- FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
- extern char *yytext;
- #define yytext_ptr yytext
-
- #ifdef __cplusplus
- static int yyinput YY_PROTO(( void ));
- #else
- static int input YY_PROTO(( void ));
- #endif
-
- static yy_state_type yy_get_previous_state YY_PROTO(( void ));
- static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
- static int yy_get_next_buffer YY_PROTO(( void ));
- static void yy_fatal_error YY_PROTO(( const char msg[] ));
-
- /* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
- */
- #define YY_DO_BEFORE_ACTION \
- yytext_ptr = yy_bp; \
- yyleng = yy_cp - yy_bp; \
- yy_hold_char = *yy_cp; \
- *yy_cp = '\0'; \
- yy_c_buf_p = yy_cp;
-
- #define YY_END_OF_BUFFER 102
- static const short int yy_accept[429] =
- { 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 89, 89, 0, 0,
- 95, 95, 102, 100, 98, 99, 100, 14, 15, 16,
- 17, 100, 100, 18, 57, 56, 72, 56, 56, 56,
- 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
- 56, 56, 56, 66, 67, 98, 6, 100, 100, 13,
- 13, 13, 13, 13, 13, 61, 61, 61, 61, 59,
- 61, 61, 58, 61, 61, 65, 65, 65, 65, 65,
- 65, 62, 63, 65, 65, 71, 71, 71, 71, 71,
- 71, 68, 69, 71, 71, 75, 75, 75, 75, 75,
-
- 73, 75, 74, 75, 75, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 17, 66, 67, 89, 90, 92,
- 89, 91, 83, 83, 84, 82, 81, 82, 82, 82,
- 80, 95, 95, 97, 98, 0, 20, 0, 0, 0,
- 94, 56, 56, 56, 56, 56, 56, 56, 56, 56,
- 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
- 56, 56, 56, 56, 98, 6, 0, 6, 5, 0,
- 93, 0, 0, 12, 0, 0, 0, 0, 0, 60,
- 0, 0, 0, 98, 0, 64, 0, 0, 0, 0,
- 70, 0, 0, 0, 0, 75, 0, 0, 0, 0,
-
- 3, 0, 0, 0, 1, 2, 89, 90, 92, 0,
- 89, 91, 91, 88, 82, 81, 82, 82, 80, 81,
- 80, 95, 95, 0, 0, 19, 79, 78, 79, 94,
- 94, 56, 56, 56, 56, 56, 56, 56, 56, 56,
- 56, 56, 56, 50, 56, 56, 56, 29, 56, 56,
- 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
- 56, 0, 93, 77, 76, 77, 93, 93, 0, 0,
- 0, 0, 60, 64, 70, 75, 3, 0, 87, 81,
- 80, 96, 78, 56, 56, 56, 56, 56, 21, 56,
- 26, 56, 56, 37, 56, 56, 51, 56, 56, 31,
-
- 53, 56, 56, 56, 56, 56, 56, 56, 56, 56,
- 30, 56, 77, 76, 77, 93, 93, 76, 0, 11,
- 0, 0, 0, 0, 0, 96, 96, 56, 56, 56,
- 56, 56, 49, 40, 56, 56, 28, 56, 56, 56,
- 56, 32, 56, 56, 56, 56, 39, 56, 56, 76,
- 0, 0, 0, 0, 56, 56, 56, 56, 56, 27,
- 22, 46, 56, 54, 56, 33, 24, 38, 56, 56,
- 56, 0, 0, 0, 86, 85, 86, 42, 56, 56,
- 56, 56, 56, 56, 25, 56, 56, 0, 0, 0,
- 85, 56, 56, 48, 35, 56, 56, 23, 36, 43,
-
- 7, 0, 0, 0, 0, 41, 56, 56, 56, 56,
- 52, 7, 0, 0, 0, 10, 56, 47, 34, 45,
- 8, 9, 56, 56, 56, 44, 55, 0
- } ;
-
- static const int yy_ec[256] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
- 1, 4, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 1, 5, 6, 1, 7, 1, 8, 9,
- 10, 11, 1, 12, 1, 13, 14, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 1, 16, 17,
- 18, 19, 1, 1, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 21, 22, 23, 1, 24, 1, 25, 26, 27, 28,
-
- 29, 30, 31, 32, 33, 20, 20, 34, 35, 36,
- 37, 38, 20, 39, 40, 41, 42, 43, 20, 44,
- 45, 20, 46, 1, 47, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1
- } ;
-
- static const int yy_meta[48] =
- { 0,
- 1, 2, 3, 1, 4, 1, 1, 1, 1, 1,
- 5, 1, 1, 6, 7, 1, 1, 1, 8, 9,
- 1, 1, 1, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 1, 1
- } ;
-
- static const short int yy_base[471] =
- { 0,
- 0, 46, 47, 54, 87, 132, 177, 223, 269, 315,
- 361, 383, 62, 405, 426, 57, 75, 94, 70, 104,
- 108, 117, 984, 985, 59, 985, 63, 985, 985, 985,
- 985, 970, 102, 985, 985, 0, 985, 958, 939, 94,
- 943, 58, 89, 937, 942, 940, 947, 950, 945, 97,
- 928, 936, 934, 985, 985, 137, 968, 922, 113, 985,
- 143, 147, 939, 931, 933, 985, 151, 78, 120, 985,
- 145, 0, 985, 156, 150, 985, 161, 147, 149, 161,
- 0, 985, 985, 172, 173, 985, 164, 168, 175, 178,
- 0, 985, 985, 191, 187, 985, 192, 195, 180, 192,
-
- 985, 0, 985, 205, 197, 985, 208, 199, 207, 202,
- 0, 216, 47, 221, 985, 985, 985, 0, 236, 985,
- 232, 230, 985, 244, 985, 985, 247, 985, 248, 251,
- 252, 0, 253, 254, 274, 237, 985, 0, 952, 273,
- 278, 0, 261, 923, 934, 937, 925, 918, 917, 917,
- 918, 919, 924, 91, 918, 928, 912, 920, 913, 918,
- 242, 910, 246, 262, 296, 945, 271, 944, 985, 295,
- 297, 942, 319, 985, 310, 914, 916, 906, 238, 985,
- 0, 285, 306, 328, 304, 985, 0, 319, 323, 328,
- 985, 0, 326, 327, 331, 985, 0, 330, 332, 334,
-
- 985, 0, 335, 336, 985, 985, 0, 368, 985, 362,
- 301, 363, 367, 344, 985, 388, 391, 387, 409, 939,
- 938, 0, 392, 353, 925, 985, 985, 936, 349, 935,
- 422, 899, 891, 898, 900, 895, 894, 903, 890, 888,
- 901, 891, 896, 0, 899, 894, 889, 892, 889, 880,
- 891, 884, 877, 879, 873, 871, 883, 874, 877, 881,
- 883, 357, 430, 985, 905, 414, 904, 435, 902, 871,
- 869, 873, 392, 395, 413, 431, 434, 448, 441, 899,
- 898, 443, 897, 862, 856, 862, 864, 860, 0, 859,
- 0, 851, 857, 0, 851, 848, 0, 852, 848, 0,
-
- 0, 861, 845, 843, 854, 849, 854, 852, 843, 847,
- 0, 836, 985, 874, 450, 873, 456, 872, 870, 985,
- 836, 829, 868, 445, 858, 866, 460, 827, 837, 832,
- 828, 838, 0, 0, 833, 825, 0, 831, 820, 814,
- 794, 0, 802, 800, 785, 796, 0, 788, 790, 820,
- 788, 771, 102, 458, 749, 745, 733, 722, 703, 0,
- 0, 0, 700, 0, 712, 0, 0, 0, 703, 695,
- 672, 695, 650, 461, 985, 668, 464, 628, 603, 596,
- 588, 561, 454, 452, 0, 462, 460, 486, 463, 413,
- 485, 462, 452, 460, 459, 448, 438, 0, 0, 0,
-
- 0, 476, 0, 0, 474, 0, 427, 402, 398, 351,
- 0, 0, 282, 245, 230, 985, 186, 0, 0, 190,
- 985, 985, 153, 143, 31, 0, 0, 985, 493, 502,
- 511, 520, 529, 538, 547, 556, 565, 574, 583, 586,
- 595, 604, 613, 622, 631, 640, 649, 658, 667, 676,
- 685, 694, 703, 712, 721, 730, 739, 748, 757, 766,
- 775, 784, 793, 802, 811, 819, 822, 831, 840, 849
- } ;
-
- static const short int yy_def[471] =
- { 0,
- 428, 1, 429, 429, 430, 430, 431, 431, 432, 432,
- 433, 433, 434, 434, 432, 15, 435, 435, 436, 437,
- 438, 438, 428, 428, 428, 428, 439, 428, 428, 428,
- 428, 428, 428, 428, 428, 440, 428, 440, 440, 440,
- 440, 440, 440, 440, 440, 440, 440, 440, 440, 440,
- 440, 440, 440, 428, 428, 428, 428, 428, 428, 428,
- 428, 441, 428, 428, 428, 428, 428, 442, 443, 428,
- 428, 444, 428, 428, 428, 428, 428, 445, 446, 428,
- 447, 428, 428, 428, 428, 428, 428, 448, 449, 428,
- 450, 428, 428, 428, 428, 428, 428, 451, 452, 428,
-
- 428, 453, 428, 428, 428, 428, 428, 454, 455, 428,
- 456, 428, 428, 428, 428, 428, 428, 457, 428, 428,
- 457, 458, 428, 428, 428, 428, 459, 428, 428, 459,
- 459, 460, 460, 428, 428, 439, 428, 439, 428, 461,
- 428, 440, 440, 440, 440, 440, 440, 440, 440, 440,
- 440, 440, 440, 440, 440, 440, 440, 440, 440, 440,
- 440, 440, 440, 440, 428, 428, 428, 428, 428, 462,
- 428, 441, 441, 428, 441, 428, 428, 428, 442, 428,
- 442, 443, 443, 428, 445, 428, 445, 446, 446, 448,
- 428, 448, 449, 449, 451, 428, 451, 452, 452, 454,
-
- 428, 454, 455, 455, 428, 428, 457, 428, 428, 428,
- 457, 458, 458, 428, 428, 459, 428, 459, 459, 428,
- 428, 460, 460, 428, 428, 428, 428, 428, 461, 428,
- 428, 440, 440, 440, 440, 440, 440, 440, 440, 440,
- 440, 440, 440, 440, 440, 440, 440, 440, 440, 440,
- 440, 440, 440, 440, 440, 440, 440, 440, 440, 440,
- 440, 463, 428, 428, 428, 462, 428, 428, 464, 428,
- 428, 428, 443, 446, 449, 452, 455, 428, 428, 428,
- 428, 428, 428, 440, 440, 440, 440, 440, 440, 440,
- 440, 440, 440, 440, 440, 440, 440, 440, 440, 440,
-
- 440, 440, 440, 440, 440, 440, 440, 440, 440, 440,
- 440, 440, 428, 428, 463, 428, 428, 428, 464, 428,
- 428, 428, 428, 428, 428, 428, 428, 440, 440, 440,
- 440, 440, 440, 440, 440, 440, 440, 440, 440, 440,
- 440, 440, 440, 440, 440, 440, 440, 440, 440, 428,
- 428, 428, 428, 465, 440, 440, 440, 440, 440, 440,
- 440, 440, 440, 440, 440, 440, 440, 440, 440, 440,
- 440, 428, 428, 428, 428, 428, 465, 440, 440, 440,
- 440, 440, 440, 440, 440, 440, 440, 466, 428, 428,
- 428, 440, 440, 440, 440, 440, 440, 440, 440, 440,
-
- 467, 428, 468, 469, 470, 440, 440, 440, 440, 440,
- 440, 467, 468, 469, 470, 428, 440, 440, 440, 440,
- 428, 428, 440, 440, 440, 440, 440, 0, 428, 428,
- 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
- 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
- 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
- 428, 428, 428, 428, 428, 428, 428, 428, 428, 428
- } ;
-
- static const short int yy_nxt[1033] =
- { 0,
- 24, 25, 26, 25, 27, 24, 24, 24, 28, 29,
- 30, 31, 32, 33, 24, 34, 24, 35, 24, 36,
- 37, 24, 24, 38, 39, 36, 40, 41, 42, 43,
- 36, 44, 45, 46, 36, 47, 36, 48, 49, 50,
- 51, 52, 53, 36, 36, 54, 55, 56, 61, 26,
- 61, 57, 58, 205, 427, 61, 26, 61, 94, 59,
- 135, 62, 135, 107, 26, 107, 108, 137, 62, 109,
- 95, 124, 125, 124, 63, 110, 119, 120, 121, 64,
- 65, 63, 180, 111, 138, 122, 64, 65, 67, 26,
- 67, 68, 206, 149, 69, 119, 120, 121, 70, 181,
-
- 71, 150, 70, 353, 122, 127, 128, 129, 72, 133,
- 134, 133, 140, 151, 130, 141, 374, 131, 133, 134,
- 133, 145, 152, 170, 247, 146, 171, 180, 159, 160,
- 147, 248, 73, 74, 26, 67, 68, 161, 165, 69,
- 135, 183, 166, 70, 135, 75, 135, 70, 173, 174,
- 167, 186, 135, 72, 135, 140, 186, 184, 141, 135,
- 170, 175, 135, 171, 135, 135, 426, 135, 187, 167,
- 189, 140, 191, 184, 141, 135, 425, 73, 77, 26,
- 77, 78, 191, 170, 79, 167, 171, 196, 140, 192,
- 80, 141, 184, 135, 135, 135, 194, 170, 81, 196,
-
- 171, 199, 140, 201, 167, 141, 184, 170, 135, 135,
- 171, 135, 140, 424, 201, 141, 197, 184, 167, 135,
- 202, 423, 82, 83, 84, 26, 77, 78, 204, 167,
- 79, 170, 416, 135, 171, 211, 85, 208, 209, 135,
- 213, 137, 180, 214, 81, 135, 210, 135, 216, 135,
- 217, 135, 220, 221, 223, 224, 223, 218, 138, 181,
- 219, 218, 218, 422, 428, 219, 255, 225, 82, 83,
- 87, 26, 87, 88, 228, 135, 89, 135, 258, 230,
- 256, 262, 90, 229, 263, 259, 421, 232, 231, 233,
- 91, 231, 180, 234, 260, 261, 265, 165, 267, 135,
-
- 235, 166, 135, 236, 211, 266, 183, 268, 186, 167,
- 268, 173, 174, 273, 92, 93, 94, 26, 87, 88,
- 173, 174, 89, 269, 175, 187, 186, 183, 95, 184,
- 274, 135, 191, 191, 275, 196, 91, 196, 201, 276,
- 189, 167, 201, 277, 189, 278, 279, 194, 194, 192,
- 228, 199, 197, 199, 224, 202, 204, 204, 314, 229,
- 92, 93, 97, 26, 97, 98, 225, 315, 99, 208,
- 209, 135, 210, 428, 100, 214, 428, 213, 210, 420,
- 214, 101, 102, 103, 104, 26, 97, 98, 220, 216,
- 99, 217, 135, 223, 135, 223, 105, 218, 218, 180,
-
- 428, 219, 186, 101, 102, 103, 112, 26, 107, 108,
- 221, 113, 109, 183, 390, 265, 189, 405, 114, 218,
- 191, 419, 219, 230, 266, 418, 111, 87, 26, 87,
- 88, 316, 231, 89, 194, 231, 267, 115, 196, 90,
- 317, 201, 324, 317, 326, 268, 324, 91, 268, 278,
- 279, 314, 199, 327, 325, 204, 327, 316, 325, 376,
- 315, 326, 390, 417, 402, 376, 317, 403, 377, 317,
- 327, 116, 117, 327, 377, 374, 416, 402, 411, 404,
- 403, 410, 409, 408, 407, 406, 391, 388, 400, 399,
- 398, 397, 404, 60, 60, 60, 60, 60, 60, 60,
-
- 60, 60, 66, 66, 66, 66, 66, 66, 66, 66,
- 66, 76, 76, 76, 76, 76, 76, 76, 76, 76,
- 86, 86, 86, 86, 86, 86, 86, 86, 86, 96,
- 96, 96, 96, 96, 96, 96, 96, 96, 106, 106,
- 106, 106, 106, 106, 106, 106, 106, 118, 118, 118,
- 118, 118, 118, 118, 118, 118, 123, 123, 123, 123,
- 123, 123, 123, 123, 123, 126, 126, 126, 126, 126,
- 126, 126, 126, 126, 132, 132, 132, 132, 132, 132,
- 132, 132, 132, 136, 136, 136, 136, 136, 136, 136,
- 136, 136, 142, 396, 142, 172, 172, 172, 172, 172,
-
- 172, 172, 172, 172, 179, 179, 179, 179, 179, 179,
- 179, 179, 179, 182, 182, 395, 182, 182, 182, 182,
- 182, 182, 180, 180, 394, 180, 180, 180, 180, 180,
- 180, 185, 185, 185, 185, 185, 185, 185, 185, 185,
- 188, 188, 393, 188, 188, 188, 188, 188, 188, 186,
- 186, 392, 186, 186, 186, 186, 186, 186, 190, 190,
- 190, 190, 190, 190, 190, 190, 190, 193, 193, 391,
- 193, 193, 193, 193, 193, 193, 191, 191, 389, 191,
- 191, 191, 191, 191, 191, 195, 195, 195, 195, 195,
- 195, 195, 195, 195, 198, 198, 388, 198, 198, 198,
-
- 198, 198, 198, 196, 196, 387, 196, 196, 196, 196,
- 196, 196, 200, 200, 200, 200, 200, 200, 200, 200,
- 200, 203, 203, 386, 203, 203, 203, 203, 203, 203,
- 201, 201, 385, 201, 201, 201, 201, 201, 201, 207,
- 384, 383, 207, 382, 207, 207, 207, 207, 212, 212,
- 381, 212, 212, 212, 212, 212, 212, 215, 215, 215,
- 215, 215, 215, 215, 215, 215, 222, 222, 380, 222,
- 222, 222, 222, 222, 222, 227, 227, 227, 227, 227,
- 379, 227, 227, 227, 264, 264, 264, 264, 264, 378,
- 264, 264, 264, 313, 313, 313, 313, 313, 373, 313,
-
- 313, 313, 319, 319, 319, 319, 319, 319, 319, 319,
- 319, 375, 375, 375, 375, 375, 372, 375, 375, 375,
- 401, 350, 371, 370, 369, 368, 367, 401, 412, 366,
- 412, 413, 413, 413, 365, 413, 413, 413, 413, 413,
- 414, 414, 414, 414, 414, 414, 414, 364, 414, 415,
- 415, 415, 415, 415, 415, 415, 415, 415, 363, 362,
- 361, 360, 359, 358, 357, 356, 355, 326, 354, 353,
- 352, 351, 320, 318, 316, 350, 349, 348, 347, 346,
- 345, 344, 343, 342, 341, 340, 339, 338, 337, 336,
- 335, 334, 333, 332, 331, 330, 329, 328, 283, 281,
-
- 280, 323, 322, 321, 320, 267, 318, 312, 311, 310,
- 309, 308, 307, 306, 305, 304, 303, 302, 301, 300,
- 299, 298, 297, 296, 295, 294, 293, 292, 291, 290,
- 289, 288, 287, 286, 285, 284, 230, 283, 282, 281,
- 280, 272, 271, 270, 174, 168, 168, 257, 254, 253,
- 252, 251, 250, 249, 246, 245, 244, 243, 242, 241,
- 240, 239, 238, 237, 226, 178, 177, 176, 169, 168,
- 164, 163, 162, 158, 157, 156, 155, 154, 153, 148,
- 144, 143, 139, 428, 23, 428, 428, 428, 428, 428,
- 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
-
- 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
- 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
- 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
- 428, 428
- } ;
-
- static const short int yy_chk[1033] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 2, 3, 3,
- 3, 2, 2, 113, 425, 4, 4, 4, 16, 2,
- 25, 3, 25, 13, 13, 13, 13, 27, 4, 13,
- 16, 19, 19, 19, 3, 13, 17, 17, 17, 3,
- 3, 4, 68, 13, 27, 17, 4, 4, 5, 5,
- 5, 5, 113, 42, 5, 18, 18, 18, 5, 68,
-
- 5, 42, 5, 353, 18, 20, 20, 20, 5, 21,
- 21, 21, 33, 43, 20, 33, 353, 20, 22, 22,
- 22, 40, 43, 59, 154, 40, 59, 69, 50, 50,
- 40, 154, 5, 6, 6, 6, 6, 50, 56, 6,
- 56, 69, 56, 6, 61, 6, 61, 6, 62, 62,
- 56, 78, 67, 6, 67, 71, 79, 74, 71, 74,
- 75, 62, 77, 75, 77, 87, 424, 87, 78, 74,
- 79, 80, 88, 84, 80, 84, 423, 6, 7, 7,
- 7, 7, 89, 85, 7, 84, 85, 99, 90, 88,
- 7, 90, 94, 97, 94, 97, 89, 95, 7, 98,
-
- 95, 99, 100, 108, 94, 100, 104, 105, 104, 107,
- 105, 107, 110, 420, 109, 110, 98, 112, 104, 112,
- 108, 417, 7, 7, 8, 8, 8, 8, 109, 112,
- 8, 114, 415, 121, 114, 121, 8, 119, 119, 119,
- 122, 136, 179, 122, 8, 124, 119, 124, 127, 129,
- 127, 129, 130, 131, 133, 134, 133, 127, 136, 179,
- 127, 130, 131, 414, 130, 131, 161, 134, 8, 8,
- 9, 9, 9, 9, 140, 135, 9, 135, 163, 141,
- 161, 167, 9, 140, 167, 163, 413, 143, 141, 143,
- 9, 141, 182, 143, 164, 164, 170, 165, 171, 165,
-
- 143, 165, 211, 143, 211, 170, 182, 171, 185, 165,
- 171, 175, 175, 183, 9, 9, 10, 10, 10, 10,
- 173, 173, 10, 173, 175, 185, 188, 183, 10, 184,
- 189, 184, 190, 193, 194, 195, 10, 198, 200, 199,
- 188, 184, 203, 204, 189, 214, 214, 193, 194, 190,
- 229, 198, 195, 199, 224, 200, 203, 204, 262, 229,
- 10, 10, 11, 11, 11, 11, 224, 262, 11, 208,
- 208, 208, 210, 212, 11, 210, 212, 213, 208, 410,
- 213, 11, 11, 11, 12, 12, 12, 12, 218, 216,
- 12, 216, 217, 223, 217, 223, 12, 218, 216, 273,
-
- 218, 216, 274, 12, 12, 12, 14, 14, 14, 14,
- 219, 14, 14, 273, 390, 266, 274, 390, 14, 219,
- 275, 409, 219, 231, 266, 408, 14, 15, 15, 15,
- 15, 263, 231, 15, 275, 231, 268, 15, 276, 15,
- 263, 277, 279, 263, 282, 268, 324, 15, 268, 278,
- 278, 315, 276, 282, 279, 277, 282, 317, 324, 354,
- 315, 327, 374, 407, 389, 377, 317, 389, 354, 317,
- 327, 15, 15, 327, 377, 374, 405, 402, 397, 389,
- 402, 396, 395, 394, 393, 392, 391, 388, 387, 386,
- 384, 383, 402, 429, 429, 429, 429, 429, 429, 429,
-
- 429, 429, 430, 430, 430, 430, 430, 430, 430, 430,
- 430, 431, 431, 431, 431, 431, 431, 431, 431, 431,
- 432, 432, 432, 432, 432, 432, 432, 432, 432, 433,
- 433, 433, 433, 433, 433, 433, 433, 433, 434, 434,
- 434, 434, 434, 434, 434, 434, 434, 435, 435, 435,
- 435, 435, 435, 435, 435, 435, 436, 436, 436, 436,
- 436, 436, 436, 436, 436, 437, 437, 437, 437, 437,
- 437, 437, 437, 437, 438, 438, 438, 438, 438, 438,
- 438, 438, 438, 439, 439, 439, 439, 439, 439, 439,
- 439, 439, 440, 382, 440, 441, 441, 441, 441, 441,
-
- 441, 441, 441, 441, 442, 442, 442, 442, 442, 442,
- 442, 442, 442, 443, 443, 381, 443, 443, 443, 443,
- 443, 443, 444, 444, 380, 444, 444, 444, 444, 444,
- 444, 445, 445, 445, 445, 445, 445, 445, 445, 445,
- 446, 446, 379, 446, 446, 446, 446, 446, 446, 447,
- 447, 378, 447, 447, 447, 447, 447, 447, 448, 448,
- 448, 448, 448, 448, 448, 448, 448, 449, 449, 376,
- 449, 449, 449, 449, 449, 449, 450, 450, 373, 450,
- 450, 450, 450, 450, 450, 451, 451, 451, 451, 451,
- 451, 451, 451, 451, 452, 452, 372, 452, 452, 452,
-
- 452, 452, 452, 453, 453, 371, 453, 453, 453, 453,
- 453, 453, 454, 454, 454, 454, 454, 454, 454, 454,
- 454, 455, 455, 370, 455, 455, 455, 455, 455, 455,
- 456, 456, 369, 456, 456, 456, 456, 456, 456, 457,
- 365, 363, 457, 359, 457, 457, 457, 457, 458, 458,
- 358, 458, 458, 458, 458, 458, 458, 459, 459, 459,
- 459, 459, 459, 459, 459, 459, 460, 460, 357, 460,
- 460, 460, 460, 460, 460, 461, 461, 461, 461, 461,
- 356, 461, 461, 461, 462, 462, 462, 462, 462, 355,
- 462, 462, 462, 463, 463, 463, 463, 463, 352, 463,
-
- 463, 463, 464, 464, 464, 464, 464, 464, 464, 464,
- 464, 465, 465, 465, 465, 465, 351, 465, 465, 465,
- 466, 350, 349, 348, 346, 345, 344, 466, 467, 343,
- 467, 468, 468, 468, 341, 468, 468, 468, 468, 468,
- 469, 469, 469, 469, 469, 469, 469, 340, 469, 470,
- 470, 470, 470, 470, 470, 470, 470, 470, 339, 338,
- 336, 335, 332, 331, 330, 329, 328, 326, 325, 323,
- 322, 321, 319, 318, 316, 314, 312, 310, 309, 308,
- 307, 306, 305, 304, 303, 302, 299, 298, 296, 295,
- 293, 292, 290, 288, 287, 286, 285, 284, 283, 281,
-
- 280, 272, 271, 270, 269, 267, 265, 261, 260, 259,
- 258, 257, 256, 255, 254, 253, 252, 251, 250, 249,
- 248, 247, 246, 245, 243, 242, 241, 240, 239, 238,
- 237, 236, 235, 234, 233, 232, 230, 228, 225, 221,
- 220, 178, 177, 176, 172, 168, 166, 162, 160, 159,
- 158, 157, 156, 155, 153, 152, 151, 150, 149, 148,
- 147, 146, 145, 144, 139, 65, 64, 63, 58, 57,
- 53, 52, 51, 49, 48, 47, 46, 45, 44, 41,
- 39, 38, 32, 23, 428, 428, 428, 428, 428, 428,
- 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
-
- 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
- 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
- 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
- 428, 428
- } ;
-
- static yy_state_type yy_last_accepting_state;
- static char *yy_last_accepting_cpos;
-
- /* The intent behind this definition is that it'll catch
- * any uses of REJECT which flex missed.
- */
- #define REJECT reject_used_but_not_detected
- #define yymore() yymore_used_but_not_detected
- #define YY_MORE_ADJ 0
- char *yytext;
- # line 1 "/lex.l"
- # line 2 "/lex.l"
- /* $Id: lex.l,v 2.0.1.23 1994/01/21 07:48:57 greyham Exp $
- *
- * C manual page generator
- * Lexical analyzer specification
- */
-
- #include <ctype.h>
-
- static char *cur_file; /* current file name (malloced) */
- int line_num = 1; /* current line number in file */
- static int curly = 0; /* number of curly brace nesting levels */
- static int square = 0; /* number of square bracket nesting levels */
- static int ly_count = 0; /* number of occurances of %% */
-
- /* temporary string buffer */
- static char buf[MAX_TEXT_LENGTH];
-
- #define DYNBUF_ALLOC 240 /* size of increment of dynamic buf */
- static char *dynbuf; /* start of dynamic buf */
- static int dynbuf_size; /* number of bytes allocated */
- static int dynbuf_current; /* current end of buffer */
-
- static boolean comment_ateol; /* does comment start & end at end of a line? */
- static boolean comment_remember;/* remember contents of current comment? */
- static boolean comment_caller; /* state we were in before */
-
- typedef struct {
- #ifdef FLEX_SCANNER
- YY_BUFFER_STATE buffer;
- #else
- FILE *fp;
- #endif
- char *file;
- int line_num;
- } IncludeStack;
-
- static int inc_depth = 0; /* include nesting level */
- static IncludeStack inc_stack[MAX_INC_DEPTH]; /* stack of included files */
-
- static void update_line_num _((void));
- static void do_include _((char *filename, int sysinc));
- static void new_dynbuf();
- static void add_dynbuf _((int c));
- static char *return_dynbuf();
- static void get_cpp_directive();
- static boolean process_line_directive _((const char *new_file));
-
- /*
- * The initial comment processing is done primarily by the rather complex lex
- * rules in the various comment start states, the main functions being removal
- * of leading *'s, /'s and whitespace on a line, the removal of trailing
- * whitespace on a line, and the coalescing of separate comments on adjacent
- * lines. The remaining bits of textual content are collected by the following
- * functions, which simply strip leading and trailing blank lines.
- */
- void start_comment _((boolean ateol));
- int end_comment _((boolean ateol));
- void add_comment _((const char *s));
- void newline_comment _((void));
-
- static int comment_newlines; /* number of newlines hit in comment */
- static boolean comment_started; /* have preceeding empty lines been skipped */
-
- #ifdef FLEX_SCANNER /* flex uses YY_START instead of YYSTATE */
- #define YYSTATE YY_START
- #ifndef YY_START /* flex 2.3.8 & before didn't support it at all */
- #define YY_START ((yy_start - 1) / 2)
- #endif
- #endif
-
- #undef yywrap /* for flex */
-
- /* SKIP skipping value assignment in an enum */
-
- /* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
- #ifdef YY_MALLOC_DECL
- YY_MALLOC_DECL
- #else
- #if __STDC__
- #ifndef __cplusplus
- #include <stdlib.h>
- #endif
- #else
- /* Just try to get by without declaring the routines. This will fail
- * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
- * or sizeof(void*) != sizeof(int).
- */
- #endif
- #endif
-
- /* Amount of stuff to slurp up with each read. */
- #ifndef YY_READ_BUF_SIZE
- #define YY_READ_BUF_SIZE 8192
- #endif
-
- /* Copy whatever the last rule matched to the standard output. */
-
- #ifndef ECHO
- /* This used to be an fputs(), but since the string might contain NUL's,
- * we now use fwrite().
- */
- #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
- #endif
-
- /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
- * is returned in "result".
- */
- #ifndef YY_INPUT
- #define YY_INPUT(buf,result,max_size) \
- if ( yy_current_buffer->yy_is_interactive ) \
- { \
- int c = getc( yyin ); \
- result = c == EOF ? 0 : 1; \
- buf[0] = (char) c; \
- } \
- else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
- && ferror( yyin ) ) \
- YY_FATAL_ERROR( "input in flex scanner failed" );
- #endif
-
- /* No semi-colon after return; correct usage is to write "yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
- #ifndef yyterminate
- #define yyterminate() return YY_NULL
- #endif
-
- /* Number of entries by which start-condition stack grows. */
- #ifndef YY_START_STACK_INCR
- #define YY_START_STACK_INCR 25
- #endif
-
- /* Report a fatal error. */
- #ifndef YY_FATAL_ERROR
- #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
- #endif
-
- /* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
- #ifndef YY_DECL
- #define YY_DECL int yylex YY_PROTO(( void ))
- #endif
-
- /* Code executed at the beginning of each rule, after yytext and yyleng
- * have been set up.
- */
- #ifndef YY_USER_ACTION
- #define YY_USER_ACTION
- #endif
-
- /* Code executed at the end of each rule. */
- #ifndef YY_BREAK
- #define YY_BREAK break;
- #endif
-
- YY_DECL
- {
- register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
- register int yy_act;
-
- # line 88 "/lex.l"
-
-
-
-
- if ( yy_init )
- {
- #ifdef YY_USER_INIT
- YY_USER_INIT;
- #endif
-
- if ( ! yy_start )
- yy_start = 1; /* first start state */
-
- if ( ! yyin )
- yyin = stdin;
-
- if ( ! yyout )
- yyout = stdout;
-
- if ( yy_current_buffer )
- yy_init_buffer( yy_current_buffer, yyin );
- else
- yy_current_buffer =
- yy_create_buffer( yyin, YY_BUF_SIZE );
-
- yy_load_buffer_state();
-
- yy_init = 0;
- }
-
- while ( 1 ) /* loops until end-of-file is reached */
- {
- yy_cp = yy_c_buf_p;
-
- /* Support of yytext. */
- *yy_cp = yy_hold_char;
-
- /* yy_bp points to the position in yy_ch_buf of the start of
- * the current run.
- */
- yy_bp = yy_cp;
-
- yy_current_state = yy_start;
- if ( yy_bp[-1] == '\n' )
- ++yy_current_state;
- yy_match:
- do
- {
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
- if ( yy_accept[yy_current_state] )
- {
- yy_last_accepting_state = yy_current_state;
- yy_last_accepting_cpos = yy_cp;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 429 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- ++yy_cp;
- }
- while ( yy_base[yy_current_state] != 985 );
-
- yy_find_action:
- yy_act = yy_accept[yy_current_state];
-
- YY_DO_BEFORE_ACTION;
-
-
- do_action: /* This label is used only to access EOF actions. */
-
-
- switch ( yy_act )
- { /* beginning of action switch */
- case 0: /* must back up */
- /* undo the effects of YY_DO_BEFORE_ACTION */
- *yy_cp = yy_hold_char;
- yy_cp = yy_last_accepting_cpos;
- yy_current_state = yy_last_accepting_state;
- goto yy_find_action;
-
- case 1:
- YY_USER_ACTION
- # line 91 "/lex.l"
- {
- if (++ly_count >= 2)
- BEGIN INITIAL;
- }
- YY_BREAK
- case 2:
- YY_USER_ACTION
- # line 95 "/lex.l"
- BEGIN INITIAL;
- YY_BREAK
- case 3:
- YY_USER_ACTION
- # line 96 "/lex.l"
- update_line_num();
- YY_BREAK
- case 4:
- YY_USER_ACTION
- # line 97 "/lex.l"
- ;
- YY_BREAK
- case 5:
- YY_USER_ACTION
- # line 98 "/lex.l"
- BEGIN LEXYACC;
- YY_BREAK
- case 6:
- YY_USER_ACTION
- # line 100 "/lex.l"
- BEGIN CPP1;
- YY_BREAK
- case 7:
- YY_USER_ACTION
- # line 102 "/lex.l"
- {
- sscanf(yytext, "define %s", buf);
- get_cpp_directive();
- new_symbol(typedef_names, buf, DS_EXTERN);
- }
- YY_BREAK
- case 8:
- YY_USER_ACTION
- # line 108 "/lex.l"
- {
- sscanf(yytext, "include \"%[^\"]\"", buf);
- get_cpp_directive();
- do_include(buf, FALSE);
- }
- YY_BREAK
- case 9:
- YY_USER_ACTION
- # line 113 "/lex.l"
- {
- sscanf(yytext, "include <%[^>]>", buf);
- get_cpp_directive();
- do_include(buf, TRUE);
- }
- YY_BREAK
- case 10:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp -= 1;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- YY_USER_ACTION
- # line 119 "/lex.l"
- {
- sscanf(yytext, "line %d \"%[^\"]\"",
- &line_num, buf);
- --line_num;
- BEGIN INITIAL;
-
- if (process_line_directive(buf))
- return T_BASEFILE;
- }
- YY_BREAK
- case 11:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp -= 1;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- YY_USER_ACTION
- # line 128 "/lex.l"
- {
- sscanf(yytext, "%d \"%[^\"]\"", &line_num, buf);
- --line_num;
- BEGIN INITIAL;
-
- if (process_line_directive(buf))
- return T_BASEFILE;
- }
- YY_BREAK
- case 12:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp -= 1;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- YY_USER_ACTION
- # line 136 "/lex.l"
- {
- sscanf(yytext, "%d ", &line_num);
- --line_num;
- BEGIN INITIAL;
- }
- YY_BREAK
- case 13:
- YY_USER_ACTION
- # line 142 "/lex.l"
- get_cpp_directive();
- YY_BREAK
- case 14:
- YY_USER_ACTION
- # line 144 "/lex.l"
- return '(';
- YY_BREAK
- case 15:
- YY_USER_ACTION
- # line 145 "/lex.l"
- return ')';
- YY_BREAK
- case 16:
- YY_USER_ACTION
- # line 146 "/lex.l"
- return '*';
- YY_BREAK
- case 17:
- YY_USER_ACTION
- # line 147 "/lex.l"
- {
- BEGIN INITIAL; /* stop skipping */
- return ',';
- }
- YY_BREAK
- case 18:
- YY_USER_ACTION
- # line 151 "/lex.l"
- return ';';
- YY_BREAK
- case 19:
- YY_USER_ACTION
- # line 152 "/lex.l"
- return T_ELLIPSIS;
- YY_BREAK
- case 20:
- YY_USER_ACTION
- # line 153 "/lex.l"
- { update_line_num(); return T_STRING_LITERAL; }
- YY_BREAK
- case 21:
- YY_USER_ACTION
- # line 155 "/lex.l"
- return T_AUTO;
- YY_BREAK
- case 22:
- YY_USER_ACTION
- # line 156 "/lex.l"
- return T_EXTERN;
- YY_BREAK
- case 23:
- YY_USER_ACTION
- # line 157 "/lex.l"
- return T_REGISTER;
- YY_BREAK
- case 24:
- YY_USER_ACTION
- # line 158 "/lex.l"
- return T_STATIC;
- YY_BREAK
- case 25:
- YY_USER_ACTION
- # line 159 "/lex.l"
- return T_TYPEDEF;
- YY_BREAK
- case 26:
- YY_USER_ACTION
- # line 160 "/lex.l"
- return T_CHAR;
- YY_BREAK
- case 27:
- YY_USER_ACTION
- # line 161 "/lex.l"
- return T_DOUBLE;
- YY_BREAK
- case 28:
- YY_USER_ACTION
- # line 162 "/lex.l"
- return T_FLOAT;
- YY_BREAK
- case 29:
- YY_USER_ACTION
- # line 163 "/lex.l"
- return T_INT;
- YY_BREAK
- case 30:
- YY_USER_ACTION
- # line 164 "/lex.l"
- return T_VOID;
- YY_BREAK
- case 31:
- YY_USER_ACTION
- # line 165 "/lex.l"
- return T_LONG;
- YY_BREAK
- case 32:
- YY_USER_ACTION
- # line 166 "/lex.l"
- return T_SHORT;
- YY_BREAK
- case 33:
- YY_USER_ACTION
- # line 167 "/lex.l"
- return T_SIGNED;
- YY_BREAK
- case 34:
- YY_USER_ACTION
- # line 168 "/lex.l"
- return T_SIGNED;
- YY_BREAK
- case 35:
- YY_USER_ACTION
- # line 169 "/lex.l"
- return T_SIGNED;
- YY_BREAK
- case 36:
- YY_USER_ACTION
- # line 170 "/lex.l"
- return T_UNSIGNED;
- YY_BREAK
- case 37:
- YY_USER_ACTION
- # line 171 "/lex.l"
- { enum_state = KEYWORD; return T_ENUM; }
- YY_BREAK
- case 38:
- YY_USER_ACTION
- # line 172 "/lex.l"
- return T_STRUCT;
- YY_BREAK
- case 39:
- YY_USER_ACTION
- # line 173 "/lex.l"
- return T_UNION;
- YY_BREAK
- case 40:
- YY_USER_ACTION
- # line 174 "/lex.l"
- return T_CONST;
- YY_BREAK
- case 41:
- YY_USER_ACTION
- # line 175 "/lex.l"
- return T_CONST;
- YY_BREAK
- case 42:
- YY_USER_ACTION
- # line 176 "/lex.l"
- return T_CONST;
- YY_BREAK
- case 43:
- YY_USER_ACTION
- # line 177 "/lex.l"
- return T_VOLATILE;
- YY_BREAK
- case 44:
- YY_USER_ACTION
- # line 178 "/lex.l"
- return T_VOLATILE;
- YY_BREAK
- case 45:
- YY_USER_ACTION
- # line 179 "/lex.l"
- return T_VOLATILE;
- YY_BREAK
- case 46:
- YY_USER_ACTION
- # line 180 "/lex.l"
- return T_INLINE;
- YY_BREAK
- case 47:
- YY_USER_ACTION
- # line 181 "/lex.l"
- return T_INLINE;
- YY_BREAK
- case 48:
- YY_USER_ACTION
- # line 182 "/lex.l"
- return T_INLINE;
- YY_BREAK
- case 49:
- YY_USER_ACTION
- # line 183 "/lex.l"
- return T_CDECL;
- YY_BREAK
- case 50:
- YY_USER_ACTION
- # line 184 "/lex.l"
- return T_FAR;
- YY_BREAK
- case 51:
- YY_USER_ACTION
- # line 185 "/lex.l"
- return T_HUGE;
- YY_BREAK
- case 52:
- YY_USER_ACTION
- # line 186 "/lex.l"
- return T_INTERRUPT;
- YY_BREAK
- case 53:
- YY_USER_ACTION
- # line 187 "/lex.l"
- return T_NEAR;
- YY_BREAK
- case 54:
- YY_USER_ACTION
- # line 188 "/lex.l"
- return T_PASCAL;
- YY_BREAK
- case 55:
- YY_USER_ACTION
- # line 189 "/lex.l"
- ;
- YY_BREAK
- case 56:
- YY_USER_ACTION
- # line 191 "/lex.l"
- {
- if (enum_state == BRACES) BEGIN SKIP;
- yylval.text = strduplicate(yytext);
- if (is_typedef_name(yytext))
- return T_TYPEDEF_NAME;
- else
- return T_IDENTIFIER;
- }
- YY_BREAK
- case 57:
- YY_USER_ACTION
- # line 200 "/lex.l"
- BEGIN INIT1;
- YY_BREAK
- case 58:
- YY_USER_ACTION
- # line 201 "/lex.l"
- { curly = 1; BEGIN INIT2; }
- YY_BREAK
- case 59:
- YY_USER_ACTION
- # line 202 "/lex.l"
- {
- unput(yytext[yyleng-1]);
- BEGIN INITIAL;
- return T_INITIALIZER;
- }
- YY_BREAK
- case 60:
- YY_USER_ACTION
- # line 207 "/lex.l"
- update_line_num();
- YY_BREAK
- case 61:
- YY_USER_ACTION
- # line 208 "/lex.l"
- ;
- YY_BREAK
- case 62:
- YY_USER_ACTION
- # line 210 "/lex.l"
- ++curly;
- YY_BREAK
- case 63:
- YY_USER_ACTION
- # line 211 "/lex.l"
- {
- if (--curly == 0) {
- BEGIN INITIAL;
- return T_INITIALIZER;
- }
- }
- YY_BREAK
- case 64:
- YY_USER_ACTION
- # line 217 "/lex.l"
- update_line_num();
- YY_BREAK
- case 65:
- YY_USER_ACTION
- # line 218 "/lex.l"
- ;
- YY_BREAK
- case 66:
- YY_USER_ACTION
- # line 220 "/lex.l"
- {
- if (enum_state == KEYWORD)
- {
- enum_state = BRACES;
- return '{';
- }
- else
- {
- curly = 1;
- BEGIN CURLY;
- }
- }
- YY_BREAK
- case 67:
- YY_USER_ACTION
- # line 232 "/lex.l"
- {
- BEGIN INITIAL; /* stop skipping */
- return '}';
- }
- YY_BREAK
- case 68:
- YY_USER_ACTION
- # line 237 "/lex.l"
- ++curly;
- YY_BREAK
- case 69:
- YY_USER_ACTION
- # line 238 "/lex.l"
- {
- if (--curly == 0) {
- BEGIN INITIAL;
- return T_BRACES;
- }
- }
- YY_BREAK
- case 70:
- YY_USER_ACTION
- # line 244 "/lex.l"
- update_line_num();
- YY_BREAK
- case 71:
- YY_USER_ACTION
- # line 245 "/lex.l"
- ;
- YY_BREAK
- case 72:
- YY_USER_ACTION
- # line 247 "/lex.l"
- {
- new_dynbuf(); add_dynbuf(yytext[0]);
- square = 1; BEGIN SQUARE;
- }
- YY_BREAK
- case 73:
- YY_USER_ACTION
- # line 251 "/lex.l"
- { ++square; add_dynbuf(yytext[0]); }
- YY_BREAK
- case 74:
- YY_USER_ACTION
- # line 252 "/lex.l"
- {
- add_dynbuf(yytext[0]);
- if (--square == 0) {
- BEGIN INITIAL;
- yylval.text = return_dynbuf();
- return T_BRACKETS;
- }
- }
- YY_BREAK
- case 75:
- YY_USER_ACTION
- # line 260 "/lex.l"
- {
- int i;
- for (i = 0; i < yyleng; ++i)
- {
- if (yytext[i] == '\n') ++line_num;
- add_dynbuf(yytext[i]);
- }
- }
- YY_BREAK
- case 76:
- YY_USER_ACTION
- # line 269 "/lex.l"
- {
- comment_caller = YYSTATE;
- start_comment(FALSE);
- BEGIN COMMENT; }
- YY_BREAK
- case 77:
- YY_USER_ACTION
- # line 273 "/lex.l"
- {
- yyless(yyleng-1);
- comment_caller = YYSTATE;
- start_comment(FALSE);
- BEGIN COMMENT; }
- YY_BREAK
- case 78:
- YY_USER_ACTION
- # line 278 "/lex.l"
- {
- comment_caller = YYSTATE;
- start_comment(TRUE);
- BEGIN COMMENT; }
- YY_BREAK
- case 79:
- YY_USER_ACTION
- # line 282 "/lex.l"
- {
- yyless(yyleng-1);
- comment_caller = YYSTATE;
- start_comment(TRUE);
- BEGIN COMMENT; }
- YY_BREAK
- case 80:
- YY_USER_ACTION
- # line 288 "/lex.l"
- case 81:
- YY_USER_ACTION
- # line 288 "/lex.l"
- BEGIN COMMENT;
- YY_BREAK
- case 82:
- YY_USER_ACTION
- # line 289 "/lex.l"
- { yyless(yyleng-1); BEGIN COMMENT; }
- YY_BREAK
- case 83:
- YY_USER_ACTION
- # line 290 "/lex.l"
- { yyless(0); BEGIN COMMENT; }
- YY_BREAK
- case 84:
- YY_USER_ACTION
- # line 291 "/lex.l"
- newline_comment();
- YY_BREAK
- case 85:
- YY_USER_ACTION
- # line 292 "/lex.l"
- newline_comment();
- YY_BREAK
- case 86:
- YY_USER_ACTION
- # line 293 "/lex.l"
- {
- yyless(yyleng-1); newline_comment(); }
- YY_BREAK
- case 87:
- *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- yy_c_buf_p = yy_cp -= 1;
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- YY_USER_ACTION
- # line 295 "/lex.l"
- { int ret = end_comment(TRUE);
- BEGIN comment_caller;
- if (ret) return ret; }
- YY_BREAK
- case 88:
- YY_USER_ACTION
- # line 298 "/lex.l"
- { int ret = end_comment(FALSE);
- BEGIN comment_caller;
- if (ret) return ret; }
- YY_BREAK
- case 89:
- YY_USER_ACTION
- # line 302 "/lex.l"
- case 90:
- YY_USER_ACTION
- # line 303 "/lex.l"
- case 91:
- YY_USER_ACTION
- # line 303 "/lex.l"
- add_comment(yytext);
- YY_BREAK
- case 92:
- YY_USER_ACTION
- # line 304 "/lex.l"
- { newline_comment(); BEGIN COMMLINE; }
- YY_BREAK
- case 93:
- YY_USER_ACTION
- # line 306 "/lex.l"
- {
- comment_caller = YYSTATE;
- start_comment(FALSE);
- BEGIN CPPCOMMENT; }
- YY_BREAK
- case 94:
- YY_USER_ACTION
- # line 310 "/lex.l"
- {
- comment_caller = YYSTATE;
- start_comment(TRUE);
- BEGIN CPPCOMMENT; }
- YY_BREAK
- case 95:
- YY_USER_ACTION
- # line 314 "/lex.l"
- add_comment(yytext);
- YY_BREAK
- case 96:
- YY_USER_ACTION
- # line 315 "/lex.l"
- newline_comment();
- YY_BREAK
- case 97:
- YY_USER_ACTION
- # line 316 "/lex.l"
- { int ret = end_comment(TRUE);
- ++line_num;
- BEGIN comment_caller;
- if (ret) return ret; }
- YY_BREAK
- case 98:
- YY_USER_ACTION
- # line 321 "/lex.l"
- ;
- YY_BREAK
- case 99:
- YY_USER_ACTION
- # line 322 "/lex.l"
- ++line_num;
- YY_BREAK
- case 100:
- YY_USER_ACTION
- # line 324 "/lex.l"
- {
- output_error();
- fprintf(stderr, "bad character '%c'\n", yytext[0]);
- }
- YY_BREAK
- case 101:
- YY_USER_ACTION
- # line 328 "/lex.l"
- ECHO;
- YY_BREAK
- case YY_STATE_EOF(INITIAL):
- case YY_STATE_EOF(CPP1):
- case YY_STATE_EOF(INIT1):
- case YY_STATE_EOF(INIT2):
- case YY_STATE_EOF(CURLY):
- case YY_STATE_EOF(SQUARE):
- case YY_STATE_EOF(LEXYACC):
- case YY_STATE_EOF(SKIP):
- case YY_STATE_EOF(COMMENT):
- case YY_STATE_EOF(COMMLINE):
- case YY_STATE_EOF(CPPCOMMENT):
- yyterminate();
-
- case YY_END_OF_BUFFER:
- {
- /* Amount of text matched not including the EOB char. */
- int yy_amount_of_matched_text = yy_cp - yytext_ptr - 1;
-
- /* Undo the effects of YY_DO_BEFORE_ACTION. */
- *yy_cp = yy_hold_char;
-
- if ( yy_current_buffer->yy_input_file != yyin )
- {
- /* This can happen if we scan a file, yywrap() returns
- * 1, and then later the user points yyin at a new
- * file to resume scanning. We have to assure
- * consistency between yy_current_buffer and our
- * globals. Here is the right place to do so, because
- * this is the first action (other than possibly a
- * back-up) that will match for the new input file.
- */
- yy_current_buffer->yy_input_file = yyin;
- yy_n_chars = yy_current_buffer->yy_n_chars;
- }
-
- /* Note that here we test for yy_c_buf_p "<=" to the position
- * of the first EOB in the buffer, since yy_c_buf_p will
- * already have been incremented past the NUL character
- * (since all states make transitions on EOB to the
- * end-of-buffer state). Contrast this with the test
- * in input().
- */
- if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
- { /* This was really a NUL. */
- yy_state_type yy_next_state;
-
- yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
-
- yy_current_state = yy_get_previous_state();
-
- /* Okay, we're now positioned to make the NUL
- * transition. We couldn't have
- * yy_get_previous_state() go ahead and do it
- * for us because it doesn't know how to deal
- * with the possibility of jamming (and we don't
- * want to build jamming into it because then it
- * will run more slowly).
- */
-
- yy_next_state = yy_try_NUL_trans( yy_current_state );
-
- yy_bp = yytext_ptr + YY_MORE_ADJ;
-
- if ( yy_next_state )
- {
- /* Consume the NUL. */
- yy_cp = ++yy_c_buf_p;
- yy_current_state = yy_next_state;
- goto yy_match;
- }
-
- else
- {
- goto yy_find_action;
- }
- }
-
- else switch ( yy_get_next_buffer() )
- {
- case EOB_ACT_END_OF_FILE:
- {
- yy_did_buffer_switch_on_eof = 0;
-
- if ( yywrap() )
- {
- /* Note: because we've taken care in
- * yy_get_next_buffer() to have set up
- * yytext, we can now set up
- * yy_c_buf_p so that if some total
- * hoser (like flex itself) wants to
- * call the scanner after we return the
- * YY_NULL, it'll still work - another
- * YY_NULL will get returned.
- */
- yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
-
- yy_act = YY_STATE_EOF(YY_START);
- goto do_action;
- }
-
- else
- {
- if ( ! yy_did_buffer_switch_on_eof )
- YY_NEW_FILE;
- }
- break;
- }
-
- case EOB_ACT_CONTINUE_SCAN:
- yy_c_buf_p =
- yytext_ptr + yy_amount_of_matched_text;
-
- yy_current_state = yy_get_previous_state();
-
- yy_cp = yy_c_buf_p;
- yy_bp = yytext_ptr + YY_MORE_ADJ;
- goto yy_match;
-
- case EOB_ACT_LAST_MATCH:
- yy_c_buf_p =
- &yy_current_buffer->yy_ch_buf[yy_n_chars];
-
- yy_current_state = yy_get_previous_state();
-
- yy_cp = yy_c_buf_p;
- yy_bp = yytext_ptr + YY_MORE_ADJ;
- goto yy_find_action;
- }
- break;
- }
-
- default:
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--no action found" );
- } /* end of action switch */
- } /* end of scanning one token */
- } /* end of yylex */
-
-
- /* yy_get_next_buffer - try to read in a new buffer
- *
- * Returns a code representing an action:
- * EOB_ACT_LAST_MATCH -
- * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- * EOB_ACT_END_OF_FILE - end of file
- */
-
- static int yy_get_next_buffer()
- {
- register char *dest = yy_current_buffer->yy_ch_buf;
- register char *source = yytext_ptr - 1; /* copy prev. char, too */
- register int number_to_move, i;
- int ret_val;
-
- if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--end of buffer missed" );
-
- if ( yy_current_buffer->yy_fill_buffer == 0 )
- { /* Don't try to fill the buffer, so this is an EOF. */
- if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
- {
- /* We matched a singled characater, the EOB, so
- * treat this as a final EOF.
- */
- return EOB_ACT_END_OF_FILE;
- }
-
- else
- {
- /* We matched some text prior to the EOB, first
- * process it.
- */
- return EOB_ACT_LAST_MATCH;
- }
- }
-
- /* Try to read more data. */
-
- /* First move last chars to start of buffer. */
- number_to_move = yy_c_buf_p - yytext_ptr;
-
- for ( i = 0; i < number_to_move; ++i )
- *(dest++) = *(source++);
-
- if ( yy_current_buffer->yy_eof_status != EOF_NOT_SEEN )
- /* don't do the read, it's not guaranteed to return an EOF,
- * just force an EOF
- */
- yy_n_chars = 0;
-
- else
- {
- int num_to_read =
- yy_current_buffer->yy_buf_size - number_to_move - 1;
-
- while ( num_to_read <= 0 )
- { /* Not enough room in the buffer - grow it. */
- #ifdef YY_USES_REJECT
- YY_FATAL_ERROR(
- "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
- #else
-
- /* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = yy_current_buffer;
-
- int yy_c_buf_p_offset = yy_c_buf_p - b->yy_ch_buf;
-
- b->yy_buf_size *= 2;
- b->yy_ch_buf = (char *)
- yy_flex_realloc( (void *) b->yy_ch_buf,
- b->yy_buf_size );
-
- if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR(
- "fatal error - scanner input buffer overflow" );
-
- yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
-
- num_to_read = yy_current_buffer->yy_buf_size -
- number_to_move - 1;
- #endif
- }
-
- if ( num_to_read > YY_READ_BUF_SIZE )
- num_to_read = YY_READ_BUF_SIZE;
-
- /* Read in more data. */
- YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
- yy_n_chars, num_to_read );
- }
-
- if ( yy_n_chars == 0 )
- {
- if ( number_to_move - YY_MORE_ADJ == 1 )
- {
- ret_val = EOB_ACT_END_OF_FILE;
- yyrestart( yyin );
- }
-
- else
- {
- ret_val = EOB_ACT_LAST_MATCH;
- yy_current_buffer->yy_eof_status = EOF_PENDING;
- }
- }
-
- else
- ret_val = EOB_ACT_CONTINUE_SCAN;
-
- yy_n_chars += number_to_move;
- yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
- yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
-
- /* yytext begins at the second character in yy_ch_buf; the first
- * character is the one which preceded it before reading in the latest
- * buffer; it needs to be kept around in case it's a newline, so
- * yy_get_previous_state() will have with '^' rules active.
- */
-
- yytext_ptr = &yy_current_buffer->yy_ch_buf[1];
-
- return ret_val;
- }
-
-
- /* yy_get_previous_state - get the state just before the EOB char was reached */
-
- static yy_state_type yy_get_previous_state()
- {
- register yy_state_type yy_current_state;
- register char *yy_cp;
-
- register char *yy_bp = yytext_ptr;
-
- yy_current_state = yy_start;
- if ( yy_bp[-1] == '\n' )
- ++yy_current_state;
-
- for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
- {
- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
- if ( yy_accept[yy_current_state] )
- {
- yy_last_accepting_state = yy_current_state;
- yy_last_accepting_cpos = yy_cp;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 429 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- }
-
- return yy_current_state;
- }
-
-
- /* yy_try_NUL_trans - try to make a transition on the NUL character
- *
- * synopsis
- * next_state = yy_try_NUL_trans( current_state );
- */
-
- #ifdef YY_USE_PROTOS
- static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
- #else
- static yy_state_type yy_try_NUL_trans( yy_current_state )
- yy_state_type yy_current_state;
- #endif
- {
- register int yy_is_jam;
- register char *yy_cp = yy_c_buf_p;
-
- register YY_CHAR yy_c = 1;
- if ( yy_accept[yy_current_state] )
- {
- yy_last_accepting_state = yy_current_state;
- yy_last_accepting_cpos = yy_cp;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 429 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- yy_is_jam = (yy_current_state == 428);
-
- return yy_is_jam ? 0 : yy_current_state;
- }
-
-
- #ifdef YY_USE_PROTOS
- static void yyunput( int c, register char *yy_bp )
- #else
- static void yyunput( c, yy_bp )
- int c;
- register char *yy_bp;
- #endif
- {
- register char *yy_cp = yy_c_buf_p;
-
- /* undo effects of setting up yytext */
- *yy_cp = yy_hold_char;
-
- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
- { /* need to shift things up to make room */
- /* +2 for EOB chars. */
- register int number_to_move = yy_n_chars + 2;
- register char *dest = &yy_current_buffer->yy_ch_buf[
- yy_current_buffer->yy_buf_size + 2];
- register char *source =
- &yy_current_buffer->yy_ch_buf[number_to_move];
-
- while ( source > yy_current_buffer->yy_ch_buf )
- *--dest = *--source;
-
- yy_cp += dest - source;
- yy_bp += dest - source;
- yy_n_chars = yy_current_buffer->yy_buf_size;
-
- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
- YY_FATAL_ERROR( "flex scanner push-back overflow" );
- }
-
- if ( yy_cp > yy_bp && yy_cp[-1] == '\n' )
- yy_cp[-2] = '\n';
-
- *--yy_cp = (char) c;
-
-
- /* Note: the formal parameter *must* be called "yy_bp" for this
- * macro to now work correctly.
- */
- YY_DO_BEFORE_ACTION; /* set up yytext again */
- }
-
-
- #ifdef __cplusplus
- static int yyinput()
- #else
- static int input()
- #endif
- {
- int c;
-
- *yy_c_buf_p = yy_hold_char;
-
- if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
- {
- /* yy_c_buf_p now points to the character we want to return.
- * If this occurs *before* the EOB characters, then it's a
- * valid NUL; if not, then we've hit the end of the buffer.
- */
- if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
- /* This was really a NUL. */
- *yy_c_buf_p = '\0';
-
- else
- { /* need more input */
- yytext_ptr = yy_c_buf_p;
- ++yy_c_buf_p;
-
- switch ( yy_get_next_buffer() )
- {
- case EOB_ACT_END_OF_FILE:
- {
- if ( yywrap() )
- {
- yy_c_buf_p =
- yytext_ptr + YY_MORE_ADJ;
- return EOF;
- }
-
- YY_NEW_FILE;
- #ifdef __cplusplus
- return yyinput();
- #else
- return input();
- #endif
- }
-
- case EOB_ACT_CONTINUE_SCAN:
- yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
- break;
-
- case EOB_ACT_LAST_MATCH:
- #ifdef __cplusplus
- YY_FATAL_ERROR(
- "unexpected last match in yyinput()" );
- #else
- YY_FATAL_ERROR(
- "unexpected last match in input()" );
- #endif
- }
- }
- }
-
- c = *yy_c_buf_p;
- *yy_c_buf_p = '\0'; /* preserve yytext */
- yy_hold_char = *++yy_c_buf_p;
-
- return c;
- }
-
-
- #ifdef YY_USE_PROTOS
- void yyrestart( FILE *input_file )
- #else
- void yyrestart( input_file )
- FILE *input_file;
- #endif
- {
- if ( ! yy_current_buffer )
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
-
- yy_init_buffer( yy_current_buffer, input_file );
- yy_load_buffer_state();
- }
-
-
- #ifdef YY_USE_PROTOS
- void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
- #else
- void yy_switch_to_buffer( new_buffer )
- YY_BUFFER_STATE new_buffer;
- #endif
- {
- if ( yy_current_buffer == new_buffer )
- return;
-
- if ( yy_current_buffer )
- {
- /* Flush out information for old buffer. */
- *yy_c_buf_p = yy_hold_char;
- yy_current_buffer->yy_buf_pos = yy_c_buf_p;
- yy_current_buffer->yy_n_chars = yy_n_chars;
- }
-
- yy_current_buffer = new_buffer;
- yy_load_buffer_state();
-
- /* We don't actually know whether we did this switch during
- * EOF (yywrap()) processing, but the only time this flag
- * is looked at is after yywrap() is called, so it's safe
- * to go ahead and always set it.
- */
- yy_did_buffer_switch_on_eof = 1;
- }
-
-
- #ifdef YY_USE_PROTOS
- void yy_load_buffer_state( void )
- #else
- void yy_load_buffer_state()
- #endif
- {
- yy_n_chars = yy_current_buffer->yy_n_chars;
- yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
- yyin = yy_current_buffer->yy_input_file;
- yy_hold_char = *yy_c_buf_p;
- }
-
-
- #ifdef YY_USE_PROTOS
- YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
- #else
- YY_BUFFER_STATE yy_create_buffer( file, size )
- FILE *file;
- int size;
- #endif
- {
- YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
-
- if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
- b->yy_buf_size = size;
-
- /* yy_ch_buf has to be 2 characters longer than the size given because
- * we need to put in 2 end-of-buffer characters.
- */
- b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
-
- if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
- yy_init_buffer( b, file );
-
- return b;
- }
-
-
- #ifdef YY_USE_PROTOS
- void yy_delete_buffer( YY_BUFFER_STATE b )
- #else
- void yy_delete_buffer( b )
- YY_BUFFER_STATE b;
- #endif
- {
- if ( b == yy_current_buffer )
- yy_current_buffer = (YY_BUFFER_STATE) 0;
-
- yy_flex_free( (void *) b->yy_ch_buf );
- yy_flex_free( (void *) b );
- }
-
-
- #ifdef YY_USE_PROTOS
- void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
- #else
- void yy_init_buffer( b, file )
- YY_BUFFER_STATE b;
- FILE *file;
- #endif
- {
- b->yy_input_file = file;
-
- /* We put in the '\n' and start reading from [1] so that an
- * initial match-at-newline will be true.
- */
-
- b->yy_ch_buf[0] = '\n';
- b->yy_n_chars = 1;
-
- /* We always need two end-of-buffer characters. The first causes
- * a transition to the end-of-buffer state. The second causes
- * a jam in that state.
- */
- b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
- b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR;
-
- b->yy_buf_pos = &b->yy_ch_buf[1];
-
- b->yy_is_interactive = file ? isatty( fileno(file) ) : 0;
-
- b->yy_fill_buffer = 1;
-
- b->yy_eof_status = EOF_NOT_SEEN;
- }
-
-
- #ifdef YY_USE_PROTOS
- static void yy_push_state( int new_state )
- #else
- static void yy_push_state( new_state )
- int new_state;
- #endif
- {
- if ( yy_start_stack_ptr >= yy_start_stack_depth )
- {
- int new_size;
-
- yy_start_stack_depth += YY_START_STACK_INCR;
- new_size = yy_start_stack_depth * sizeof( int );
-
- if ( ! yy_start_stack )
- yy_start_stack = (int *) yy_flex_alloc( new_size );
-
- else
- yy_start_stack = (int *) yy_flex_realloc(
- (void *) yy_start_stack, new_size );
-
- if ( ! yy_start_stack )
- YY_FATAL_ERROR(
- "out of memory expanding start-condition stack" );
- }
-
- yy_start_stack[yy_start_stack_ptr++] = YY_START;
-
- BEGIN(new_state);
- }
-
-
- static void yy_pop_state()
- {
- if ( --yy_start_stack_ptr < 0 )
- YY_FATAL_ERROR( "start-condition stack underflow" );
-
- BEGIN(yy_start_stack[yy_start_stack_ptr]);
- }
-
-
- static int yy_top_state()
- {
- return yy_start_stack[yy_start_stack_ptr - 1];
- }
-
-
- #ifdef YY_USE_PROTOS
- static void yy_fatal_error( const char msg[] )
- #else
- static void yy_fatal_error( msg )
- char msg[];
- #endif
- {
- (void) fprintf( stderr, "%s\n", msg );
- exit( 1 );
- }
-
-
-
- /* Redefine yyless() so it works in section 3 code. */
-
- #undef yyless
- #define yyless(n) \
- do \
- { \
- /* Undo effects of setting up yytext. */ \
- yytext[yyleng] = yy_hold_char; \
- yy_c_buf_p = yytext + n - YY_MORE_ADJ; \
- yy_hold_char = *yy_c_buf_p; \
- *yy_c_buf_p = '\0'; \
- yyleng = n; \
- } \
- while ( 0 )
-
-
- /* Internal utility routines. */
-
- #ifndef yytext_ptr
- #ifdef YY_USE_PROTOS
- static void yy_flex_strcpy( char *s1, const char *s2 )
- #else
- static void yy_flex_strcpy( s1, s2 )
- char *s1;
- const char *s2;
- #endif
- {
- while ( (*(s1++) = *(s2++)) )
- ;
- }
- #endif
-
-
- #ifdef YY_USE_PROTOS
- static void *yy_flex_alloc( unsigned int size )
- #else
- static void *yy_flex_alloc( size )
- unsigned int size;
- #endif
- {
- return (void *) malloc( size );
- }
-
- #ifdef YY_USE_PROTOS
- static void *yy_flex_realloc( void *ptr, unsigned int size )
- #else
- static void *yy_flex_realloc( ptr, size )
- void *ptr;
- unsigned int size;
- #endif
- {
- return (void *) realloc( ptr, size );
- }
-
- #ifdef YY_USE_PROTOS
- static void yy_flex_free( void *ptr )
- #else
- static void yy_flex_free( ptr )
- void *ptr;
- #endif
- {
- free( ptr );
- }
- # line 328 "/lex.l"
-
-
- /* If the matched text contains any new line characters, then update the
- * current line number.
- */
- static void
- update_line_num ()
- {
- char *p = yytext;
- while (*p != '\0') {
- if (*p++ == '\n')
- line_num++;
- }
- }
-
- void start_comment(ateol)
- boolean ateol; /* does comment start at end of an existing line? */
- {
- comment_remember = (comment_caller == INITIAL || comment_caller == SKIP) &&
- (inbasefile || enum_state == BRACES);
-
- if (comment_remember)
- {
- comment_ateol = ateol;
- comment_newlines = 0;
- comment_started = FALSE;
- new_dynbuf();
- }
- }
-
- int end_comment(ateol)
- boolean ateol; /* does comment end at end of line? */
- {
- if (comment_remember)
- {
- if (!ateol) comment_ateol = FALSE;
- yylval.text = return_dynbuf();
- if (yylval.text[0] == '\0')
- {
- free(yylval.text);
- return 0;
- }
- #ifdef DEBUG
- fprintf(stderr,"`%s'\n", yylval.text);
- #endif
- return comment_ateol ? T_EOLCOMMENT : T_COMMENT;
- }
- return 0;
- }
-
- /* add a newline to the comment, deferring to remove trailing ones */
- void newline_comment()
- {
- ++line_num;
-
- if (!comment_remember || !comment_started) return;
-
- comment_newlines++;
- }
-
- /* add some true text to the comment */
- void add_comment(s)
- const char *s;
- {
- #ifdef DEBUG
- fprintf(stderr,"`%s'\n", s);
- #endif
- if (!comment_remember) return;
-
- comment_started = TRUE;
-
- while (comment_newlines)
- {
- add_dynbuf('\n');
- comment_newlines--;
- }
-
- while(*s)
- add_dynbuf(*s++);
- }
-
- /* Scan rest of preprocessor statement.
- */
- static void
- get_cpp_directive ()
- {
- int c, lastc = '\0';
-
- while ((c = input()) > 0) {
- switch (c) {
- case '\n':
- if (lastc != '\\') {
- unput(c);
- BEGIN INITIAL;
- return;
- }
- line_num++;
- break;
- case '*':
- if (lastc == '/')
- {
- /* might be able to attach comments to #defines one day */
- comment_caller = YYSTATE;
- start_comment(TRUE);
- BEGIN COMMENT;
- }
- break;
- case '/':
- if (lastc == '/')
- {
- /* might be able to attach comments to #defines one day */
- comment_caller = YYSTATE;
- start_comment(TRUE);
- BEGIN CPPCOMMENT;
- }
- break;
- }
- lastc = c;
- }
- }
-
- /* Process include directive.
- */
- static void
- do_include (filename, sysinc)
- char *filename; /* file name */
- int sysinc; /* 1 = do not search current directory */
- {
- char path[MAX_TEXT_LENGTH];
- int i;
- FILE *fp;
- IncludeStack *sp;
-
- if (inc_depth >= MAX_INC_DEPTH) {
- output_error();
- fprintf(stderr, "includes too deeply nested\n");
- return;
- }
-
- for (i = sysinc != 0; i < num_inc_dir; ++i) {
- strcpy(path, inc_dir[i]);
- strcat(path, filename);
- if ((fp = fopen(path, "r")) != NULL) {
- sp = inc_stack + inc_depth;
- sp->file = cur_file;
- sp->line_num = line_num;
- #ifdef FLEX_SCANNER
- sp->buffer = YY_CURRENT_BUFFER;
- yy_switch_to_buffer(yy_create_buffer(fp, YY_BUF_SIZE));
- #else
- sp->fp = yyin;
- yyin = fp;
- #endif
- ++inc_depth;
- cur_file = strduplicate(filename);
- line_num = 0;
- return;
- }
- }
- }
-
- /* returns TRUE if the basefile status has changed */
- static boolean process_line_directive(new_file)
- const char *new_file;
- {
- boolean new_stdin;
-
- /* strip leading ./ that Sun acc prepends */
- if (!strncmp(new_file,"./",2))
- new_file += 2;
-
- new_stdin = new_file[0] == '\0' || !strcmp(new_file,"stdin");
-
- /* return BASEFILE token only when file changes */
- if ((cur_file == NULL && !new_stdin) ||
- (cur_file != NULL &&strcmp(cur_file, new_file)))
- {
- safe_free(cur_file);
- cur_file = new_stdin ? NULL : strduplicate(new_file);
- yylval.boolean = basefile ? !strcmp(cur_file,basefile) :
- cur_file == basefile;
- return TRUE;
- }
- return FALSE;
- }
-
- /* When the end of the current input file is reached, pop any
- * nested includes.
- */
- int
- yywrap ()
- {
- IncludeStack *sp;
-
- if (inc_depth > 0) {
- --inc_depth;
- sp = inc_stack + inc_depth;
- fclose(yyin);
- #ifdef FLEX_SCANNER
- yy_delete_buffer(YY_CURRENT_BUFFER);
- yy_switch_to_buffer(sp->buffer);
- #else
- yyin = sp->fp;
- #endif
- safe_free(cur_file);
- cur_file = sp->file;
- line_num = sp->line_num + 1;
- return 0;
- } else {
- return 1;
- }
- }
-
-
- static void new_dynbuf()
- {
- if ((dynbuf = malloc(dynbuf_size = DYNBUF_ALLOC)) == 0)
- outmem();
-
- dynbuf_current = 0;
- }
-
- static void add_dynbuf(c)
- int c;
- {
- if (dynbuf_current == dynbuf_size &&
- ((dynbuf = realloc(dynbuf,dynbuf_size += DYNBUF_ALLOC)) == 0))
- outmem();
-
- dynbuf[dynbuf_current++] = c;
- }
-
- static char *return_dynbuf()
- {
- add_dynbuf('\0');
-
- /* chop it back to size */
- if ((dynbuf = realloc(dynbuf,dynbuf_current)) == 0)
- outmem();
-
- return dynbuf;
- }
-
- /* Output an error message along with the current line number in the
- * source file.
- */
- void
- output_error ()
- {
- errors++;
- fprintf(stderr, "%s:%d: ", cur_file ? cur_file : "stdin", line_num);
- }
-